enyo.kind({
    name: "MyApps.GolfGuide",
    kind: enyo.VFlexBox,
    events: {
        onBack: "",
    },
    
    components: [{
        name: "pane",
        kind: "Pane",
        flex: 1,
        transitionKind: "enyo.transitions.LeftRightFlyin",
        components: [{
            name: "menu",
            kind: "VFlexBox",
            className: "bg-gp",
            components: [{
                kind: "PageHeader",
                className: "enyo-header-dark",
                components: [{
                    kind: "IconButton",
                    onclick: "doBack",
                    icon: "images/menu-icon-back.png",
                    className: "enyo-button-dark"
                }, {
                    kind: "VFlexBox",
                    flex: 1,
                    align: "center",
                    components: [{
                        content: "Guide des golfs"
                    }, ]
                }, ]
            }, {
                kind: "Button",
                className: "enyo-button-affirmative",
                caption: "Tous les golfe",
                onclick: "showGolfClubs"
            }, {
                kind: "Button",
                className: "enyo-button-affirmative",
                caption: "Golfs à proximité",
                onclick: "showGolfClubsAround"
            }, {
                kind: "Button",
                className: "enyo-button-affirmative",
                caption: "Les Pros",
                onclick: "showPartners"
            }, ]
        }, {
            name: "golfclubs",
            className: "enyo-bg",
            kind: "MyApps.GolfClubs",
            onBack: "goBack",
            lazy: true
        }, {
            name: "golfclubsaround",
            className: "enyo-bg",
            kind: "MyApps.GolfClubsAround",
            onBack: "goBack",
            lazy: true
        }, {
            name: "partners",
            className: "enyo-bg",
            kind: "MyApps.Partners",
            onBack: "goBack",
            lazy: true
        }, ]
    }, ],
    showGolfClubs: function(){
        this.$.pane.selectViewByName("golfclubs");
    },
    showGolfClubsAround: function(){
        this.$.pane.selectViewByName("golfclubsaround");
    },
    showPartners: function(){
        this.$.pane.selectViewByName("partners");
    },
    
    goBack: function(inSender, inEvent){
        this.$.pane.back(inEvent);
    }
});

